﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>代购就上代购岛，代购岛是一个透明、共赢的服务平台！-代购网-海外代购|奶粉代购|化妆品代购</title>
<meta name="keywords" content="www.taobao.com,代购岛,代购网,代购,tao bao,daigou,淘宝代购,保健品代购,lv,coach代购,奶粉代购,正品代购，网上购物,网,代购" />
<meta name="description" content="代购岛是一个专注于代购领域的服务交易平台，是目前唯一一家以服务的形式提供代购业务的公司。在这里,用户可以雇佣经纪人代购自己需要的商品;愿意跑腿的人可以申请做经纪人,通过提供代购服务赚取佣金。代购岛网站倡导健康、优雅的品质生活,致力于营造诚信、分享的共赢文化，力图让每个人都可以足不出户代购全球优质商品." /> 
<link href="<%=path%>/css/main.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/ui-lightness/jquery.custom.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/pshow.css" type="text/css" rel="stylesheet"/>	

<script src="<%=path%>/script/tab.js"></script>
<script src="<%=path%>/script/resizeimg.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.datePicker-min.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.custom.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.iappm.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.tab.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.common.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.ie6.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.my.js"></script>
		<script type="text/javascript" src="<%=path%>/script/jquery.automatic.js"></script>
		<script src="<%=path%>/script/pshow.base.js" type=text/javascript></script>
		<script src="<%=path%>/script/resizeimg.js"></script>
		<script src="<%=path%>/script/input.js"></script>
		<script src="<%=path%>/script/tab.js"></script>
		<script src="<%=path%>/script/pshow.lib.js" type=text/javascript></script>
		<script src="<%=path%>/script/pshow.js" type=text/javascript></script>
		<script src="<%=path%>/script/common.js" type=text/javascript></script>
		<script src="<%=path%>/script/jquery.form.js" type=text/javascript></script>
		<script src="<%=path%>/script/My97DatePicker/WdatePicker.js" type=text/javascript></script>
		<script src="<%=path%>/script/slide.js" type=text/javascript></script>


<style>
html,body{height:100%;}
body,div,h2{margin:0;padding:0;}
body{font:12px/1.5 Tahoma;}
center{padding-top:10px;}
#overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#666;opacity:0.5;filter:alpha(opacity=50);display:none;z-index:998;
position:fixed!important;/*FF IE7*/
position:absolute;/*IE6*/
_top:       expression(eval(document.compatMode &&
            document.compatMode=='CSS1Compat') ?
            documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
            document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/}
#win{position:absolute;top:35%;left:48%;width:400px;height:245px;background:#fff;border:2px solid #a00000;display:none;z-index:999;
left:50%;
top:50%;
margin-left:-150px!important;/*FF IE7 该值为本身宽的一半 */
margin-top:-60px!important;/*FF IE7 该值为本身高的一半*/
margin-top:0px;
position:fixed!important;/* FF IE7*/
position:absolute;/*IE6*/
_top:       expression(eval(document.compatMode &&
            document.compatMode=='CSS1Compat') ?
            documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2 :/*IE6*/
            document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2);/*IE5 IE5.5*/}

h2{font-size:12px;height:18px;text-align:right;background:#A10;border-bottom:0px solid #f90;padding:5px;cursor:move;}
h2 span{color:#f90;cursor:pointer;background:#fff;border:0px solid #f90;padding:0 0px;}
</style>

<script>
window.onload = function ()
{
	var oWin = document.getElementById("win");
	var oLay = document.getElementById("overlay");	
	var oClose = document.getElementById("close");
	var oH2 = oWin.getElementsByTagName("h2")[0];
	var bDrag = false;
	var disX = disY = 0;
	oClose.onclick = function ()
	{
		oLay.style.display = "none";
		oWin.style.display = "none";
		
	};
	oClose.onmousedown = function (event)
	{
		(event || window.event).cancelBubble = true;
	};
	oH2.onmousedown = function (event)
	{		
		var event = event || window.event;
		bDrag = true;
		disX = event.clientX - oWin.offsetLeft;
		disY = event.clientY - oWin.offsetTop;		
		this.setCapture && this.setCapture();		
		return false;
	};
	document.onmousemove = function (event)
	{
		if (!bDrag) return;
		var event = event || window.event;
		var iL = event.clientX - disX;
		var iT = event.clientY - disY;
		var maxL = document.documentElement.clientWidth - oWin.offsetWidth;
		var maxT = document.documentElement.clientHeight - oWin.offsetHeight;		
		iL = iL < 0 ? 0 : iL;
		iL = iL > maxL ? maxL : iL; 		
		iT = iT < 0 ? 0 : iT;
		iT = iT > maxT ? maxT : iT;
		
		oWin.style.marginTop = oWin.style.marginLeft = 0;
		oWin.style.left = iL + "px";
		oWin.style.top = iT + "px";		
		return false;
	};
	document.onmouseup = window.onblur = oH2.onlosecapture = function ()
	{
		bDrag = false;				
		oH2.releaseCapture && oH2.releaseCapture();
	};
};
</script>

<script>
$(function(){
	$("#cart").click(showCart);
	
	$("#aLogin").click(doLogin);
	
	$("#apwd").bind('keyup',function(event) {
		if(event.keyCode==13){
			doLogin();
		}
	});
}); 

var to = 0;
var type = 0;
var lUserId = 0;
var fUserId = 0;
var bLogin = false;

var doLogin = function(){
	var mail = $("#amail").val();
	var pwd = $("#apwd").val();
	
	if(!mail && !pwd){
		$("#msg").html("<font color='red'>请输入您的登录邮箱和密码</font>");
		return;
	}
	
	if(!mail){
		$("#msg").html("<font color='red'>请输入您的登录邮箱</font>");
		return;
	}
	
	if(!pwd){
		$("#msg").html("<font color='red'>请输入您的密码</font>");
		return;
	}
	
	$.ajax({
		type:"POST",
		url:"aLogin.htm",
		data:{email:mail, pwd:pwd},
		datatype:"text",
		success:function(data){
			if(data == ""){
				$("#msg").html("<font color='red'>用户名或者密码错误!</font>");
			}else{
				bLogin = true;
				closeLogin();
				var array = data.split("|");
				lUserId = array[0];
				type = array[2];
				$("#welcome").html("您好，"+array[1]+"&nbsp;&nbsp;<a style='color:#A10000' href='<%=path%>/logout.htm'>退出登录</a>");
				call();
			}
	    }
	});
};

//登录成功后的适配器函数
var call = function(){
	if(0==to){
		showCart();
	}else if(1==to){
		newDaiGou();
	}else if(2==to){
		newQiouGou();
	}else if(3==to){
		follow(fUserId, 3);
	}else if(4==to){
		follow(fUserId, 4);
	}else if(5==to){
		follow(fUserId, 5);
	}else if (6==to) {
		invite(_wantId, _userId);
	}else if (7==to) {
		rideBuy(_wantId, _userId);
	}else if (8 == to) {
		purchase();
	}else if (9 == to) {
		addItem();
	}else if (10==to){
		wantBuy();
	}else if (11==to){
		rideBuy();
	}
};

var showLogin = function(){
	var oLay = document.getElementById("overlay");
	var oWin = document.getElementById("win"); 
	oLay.style.display = "block";
	oWin.style.display = "block";
};

var closeLogin = function(){
	var oLay = document.getElementById("overlay");
	var oWin = document.getElementById("win"); 
	oLay.style.display = "none";
	oWin.style.display = "none";
};

var showCart = function(){
	var userObj = "${sessionScope.user}";
	if(userObj == '' && !bLogin){
		to = 0;
		showLogin();
	}else{
		window.open("cart.htm", "_blank");
	}
};
</script>
<!--图片转换效果-->

<SCRIPT type=text/javascript> 

var f007 = function(id) {
 return "string" == typeof id ? document.getElementById(id) : id;
};


var Extend = function(destination, source) {
 for ( var property in source) {
  destination[property] = source[property];
 }
 return destination;
};
var CurrentStyle = function(element) {
 return element.currentStyle
   || document.defaultView.getComputedStyle(element, null);
};
var Bind = function(object, fun) {
 var args = Array.prototype.slice.call(arguments).slice(2);
 return function() {
  return fun.apply(object, args.concat(Array.prototype.slice
    .call(arguments)));
 };
};
var Tween = {
 Quart : {
  easeOut : function(t, b, c, d) {
   return -c * ((t = t / d - 1) * t * t * t - 1) + b;
  }
 },
 Back : {
  easeOut : function(t, b, c, d, s) {
   if (s == undefined)
    s = 1.70158;
   return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
  }
 },
 Bounce : {
  easeOut : function(t, b, c, d) {
   if ((t /= d) < (1 / 2.75)) {
    return c * (7.5625 * t * t) + b;
   } else if (t < (2 / 2.75)) {
    return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
   } else if (t < (2.5 / 2.75)) {
    return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
   } else {
    return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
   }
  }
 }
};
// 容器对象,滑动对象,切换数量
var SlideTrans = function(container, slider, count, options) {
 this._slider = f007(slider);
 this._container = f007(container);// 容器对象
 this._timer = null;// 定时器
 this._count = Math.abs(count);// 切换数量
 this._target = 0;// 目标值
 this._t = this._b = this._c = 0;// tween参数

 this.Index = 0;// 当前索引

 this.SetOptions(options);

 this.Auto = !!this.options.Auto;
 this.Duration = Math.abs(this.options.Duration);
 this.Time = Math.abs(this.options.Time);
 this.Pause = Math.abs(this.options.Pause);
 this.Tween = this.options.Tween;
 this.onStart = this.options.onStart;
 this.onFinish = this.options.onFinish;

 var bVertical = !!this.options.Vertical;
 this._css = bVertical ? "top" : "left";// 方向

 // 样式设置
 var p = CurrentStyle(this._container).position;
 p == "relative" || p == "absolute"
   || (this._container.style.position = "relative");
 this._container.style.overflow = "hidden";
 this._slider.style.position = "absolute";

 this.Change = this.options.Change ? this.options.Change
   : this._slider[bVertical ? "offsetHeight" : "offsetWidth"]
     / this._count;
};
SlideTrans.prototype = {
 // 设置默认属性
 SetOptions : function(options) {
  this.options = {// 默认值
   Vertical : true,// 是否垂直方向（方向不能改）
   Auto : true,// 是否自动
   Change : 0,// 改变量
   Duration : 50,// 滑动持续时间
   Time : 10,// 滑动延时
   Pause : 4000,// 停顿时间(Auto为true时有效)
   onStart : function() {
   },// 开始转换时执行
   onFinish : function() {
   },// 完成转换时执行
   Tween : Tween.Quart.easeOut
  // tween算子
  };
  Extend(this.options, options || {});
 },
 // 开始切换
 Run : function(index) {
  // 修正index
  index == undefined && (index = this.Index);
  index < 0 && (index = this._count - 1) || index >= this._count
    && (index = 0);
  // 设置参数
  this._target = -Math.abs(this.Change) * (this.Index = index);
  this._t = 0;
  this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top"
    : "left"]);
  this._c = this._target - this._b;

  this.onStart();
  this.Move();
 },
 // 移动
 Move : function() {
  clearTimeout(this._timer);
  // 未到达目标继续移动否则进行下一次滑动
  if (this._c && this._t < this.Duration) {
   this.MoveTo(Math.round(this.Tween(this._t++, this._b, this._c,
     this.Duration)));
   this._timer = setTimeout(Bind(this, this.Move), this.Time);
  } else {
   this.MoveTo(this._target);
   this.Auto
     && (this._timer = setTimeout(Bind(this, this.Next),
       this.Pause));
  }
 },
 // 移动到
 MoveTo : function(i) {
  this._slider.style[this._css] = i + "px";
 },
 // 下一个
 Next : function() {
  this.Run(++this.Index);
 },
 // 上一个
 Previous : function() {
  this.Run(--this.Index);
 },
 // 停止
 Stop : function() {
  clearTimeout(this._timer);
  this.MoveTo(this._target);
 }
};
</SCRIPT>

</head>
<body>
<div id="overlay"  ></div>
<div id="win">
<h2><div class="wrap_left"><span class="span_denglu">登陆代购岛</span></div>
<span id="close"><img src="images/close1.png" border="0"/></span></h2>

	<div class="reg_main1">
				<div id="msg" align="center"></div>
            	<li>登录邮箱：<input id="amail" type="text" class="input1" /></li>
                <li>登录密码：<input id="apwd" type="password" class="input1" /></li>
              <li><div id="button" class="login_but"><span style=" margin-left:0px"><input type="button" class="login" id="aLogin" value="登&nbsp;&nbsp;录" style="cursor:pointer"/></span></div>
<a href="<%=path%>/retrievepassword.htm"><span class="span_wjmm">忘记密码了？</span></a>
<a href="<%=path%>/new_register.htm"><span class="span_ljzc">立即注册</span></a>
</li>
            </div>
</div>
<div class="wrap0">
	<!--顶部开始-->
	<div class="top1">
		<div class="wrap1">
			<s:if test="#session.user==null||#session.user.isEmpty()">
    			<div id="welcome" class="wrap_left head_font">倡导品质生活,营造共营文化,让每个人都可以足不出户畅享全球品质商品!&nbsp;&nbsp;<span style="color:#A10000"><a style="color:#A10000" href="<%=path%>/login.htm">[ 登录</a>&nbsp;&nbsp;| &nbsp;&nbsp;<a style="color:#A10000" href="<%=path%>/new_register.htm">免费注册  ]</a></span></div>
            </s:if>
            <s:else>
     			<div class="wrap_left">您好，${sessionScope.user.nickName}&nbsp;&nbsp;<a style="color:#A10000" href="<%=path%>/logout.htm">退出登录</a></div>
     		</s:else>
				<div class="wrap_right right">
					<div class="list_box_top head_font">
						<ul>
						   <li><a href="<%=path%>/main.htm">返回首页</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
						    <li><a id="cart" style="cursor:pointer">代购车<span id="cartNum" style="color: red">
						    	<s:if test="#session.cart == null">
						    		0
						    	</s:if>
						    	<s:else>
						    		<s:property value="#session.cart" />
						    	</s:else>
								
								</span>件</a>
							</li>
							<li class="mainlevel"><a href="<%=path%>/accountinit.htm" class="sub">&nbsp;&nbsp;我的代购岛
									<!--[if IE 7]><!-->
							</a> <!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]-->
								<ul class="level">
									<li><a href="<%=path%>/accountinit.htm" class="sub">&nbsp;&nbsp;我的代购岛</a></li>
									<li><a href="<%=path%>/initShopinfo.htm">我发布的代购信息</a></li>
									<li><a href="<%=path%>/initWantBuyInfo.htm">我发布的求购信息</a></li>
								</ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li>
							<li><a href="<%=path%>/help/help.jsp">帮助中心</a></li>
						</ul>
					</div>
            <div class="clear"></div> 
    	</div>
	</div>
    </div>
    
    <div class="wrap1">
    	<div class="top3">
    		<div class="wrap_left"><div class="box_logo"><a href="<%=path%>/main.htm"><img src="<%=path%>/images/logo.png" /></a></div></div>
        	<div class="wrap_left">
            
<!--搜索选项卡开始 -->
<div class="box0_search">
<div id="tabbox5">
		<ul>
			<li id="tabe1" onclick="setTab('tabe',1,3)" class="hover"><a>代购信息</a></li>
			<li id="tabe2" onclick="setTab('tabe',2,3)"><a>求购信息</a></li>
			<li id="tabe3" onclick="setTab('tabe',3,3)" style="border:0"><a>代购经纪人</a></li>
 		</ul>
 
</div>
 <div id="conten5">
 		<div class="tabe_show" id="con_tabe_1">
        <s:form id="search1" action="canBuyList" method="get">
        	<s:textfield name="q" cssClass="input_search" size="45" /><input id="btnSearch1" type="button" class="but_search" value="搜索" onclick="$('#search1').submit();"/>
        </s:form>
        </div>
        <div class="tabe_show" id="con_tabe_2">
        <s:form id="search2" action="wantBuyList" method="get">
        	<s:textfield name="q" cssClass="input_search"  size="45"/><input id="btnSearch2" type="button" class="but_search" value="搜索" onclick="$('#search2').submit();"/>
        </s:form>
        </div>
        <div class="tabe_show" id="con_tabe_3">
        <s:form id="search3" action="broker" method="get">
        	<s:textfield name="q" cssClass="input_search" size="45"/><input id="btnSearch3" type="button" class="but_search" value="搜索" onclick="$('#search3').submit()"/>
        </s:form></div>
 </div>
 </div>
<!--搜索选项卡结束 -->        
            </div>

    </div>
    </div>
<!--顶部结束-->
<div class="clear"></div> 

